package com.bwie.service.impl;

import com.bwie.dao.BargainDao;
import com.bwie.entity.Bargain;
import com.bwie.entity.Seckill;
import com.bwie.service.BargainService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 高洋
 * @Classname BargainServicelmpl
 * @Description
 * @Date 2022/7/7 10:24
 */
@Service
public class BargainServicelmpl implements BargainService {

    @Autowired
    private BargainDao bargainDao;

    @Override
    public PageInfo<Bargain> list(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Bargain> list = bargainDao.list();
        return new PageInfo<>(list);
    }
}
